//
//  QCTempViewController.swift
//  SwiftDemoWithSina
//
//  Created by qu on 2017/1/17.
//  Copyright © 2017年 Apple. All rights reserved.
//

import UIKit

class QCTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setUpUI()
    }
    
    private func setUpUI() {
        view.backgroundColor = randomColor()
        setUpNav()
    }
    private func setUpNav() {
        title = "第\(navigationController?.childViewControllers.count ?? 0)个控制器"
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "", title: "跳转", target: self, action: #selector(rightBtnClick))
        
    }
    
    @objc private func rightBtnClick() {
        
        let tempVC = QCTempViewController()
        navigationController?.pushViewController(tempVC, animated: true)
        
    }
    
}
